.discover-page {
    background-color: #F2F3F8; // 更贴近社交场景背景
    padding-bottom: 120rpx;
    /* 增加底部padding，确保内容不被tab栏遮挡 */
    padding-top: 210rpx;

    .fixed-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 999;
        background-color: #FFFFFF;
    }

    .dynamic-info {
        background-color: #fff;
        padding: 0rpx 37rpx 30rpx 26rpx; // 增大内边距

        margin-bottom: 40rpx;
        box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.03);
        margin-top: 2rpx;
        // position: relative;


        .dynamic-header {
            position: fixed;
            bottom: 600rpx;
            right: 25rpx;
            width: 90rpx;
            height: 90rpx;
            background: #BEFF33;
            box-shadow: 0rpx 6rpx 11rpx 0rpx #EEFFC9;
            border-radius: 16rpx;
            font-family: Source Han Sans CN;
            font-weight: 400;
            font-size: 22rpx;
            color: #0E1C37;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 999;

        }

        .dynamic-content {
            display: flex;
            align-items: flex-start;
            padding-bottom: 30rpx;
            padding-top: 32rpx;
            // border-bottom: 1px solid #f8f8f8; // 分割线

            .avatar {
                width: 72rpx;
                height: 72rpx;
                border-radius: 50%;
                margin-right: 14rpx;

            }

            .text-wrap {
                flex: 1;

                .header {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    margin-top: 7rpx;

                    .nickname {
                        font-family: Source Han Sans CN;
                        font-weight: 500;
                        font-size: 26rpx;
                        color: #0E1C37;
                        // margin-bottom: 15rpx;
                    }

                    .time {

                        font-family: Source Han Sans CN;
                        font-weight: 400;
                        font-size: 22rpx;
                        color: #888B9A;
                        margin-bottom: 35rpx;
                    }


                }


                .content-container {
                    position: relative;
                    max-height: 138rpx; // 3行高度
                    overflow: hidden;
                    transition: max-height 0.3s ease;
                    margin-bottom: 30rpx;
                    line-height: 46rpx; // 确保行高一致

                    &.expanded {
                        max-height: none; // 展开时取消限制
                    }

                    .content {
                        font-size: 30rpx;
                        word-break: break-word;
                        // 添加以下样式确保正确计算高度
                        white-space: pre-wrap;
                        word-wrap: break-word;
                    }

                    .toggle-btn {
                        position: absolute;
                        right: 3rpx;
                        bottom: 0;
                        background: #fff;
                        padding-left: 8rpx;
                        color: #4789ec;
                        z-index: 10;
                        font-size: 30rpx;
                        height: 46rpx;
                        line-height: 46rpx;
                    }
                }

                // 图片容器
                .dynamic-images {
                    display: flex;
                    flex-wrap: wrap;
                    justify-content: flex-start;
                    gap: 12rpx;
                    /* 图片间距 */
                    margin-bottom: 40rpx;
                    box-sizing: border-box;
                    width: 100%;

                    .dynamic-img {
                        width: calc((100% - 24rpx) / 3);
                        height: 186rpx;
                        border-radius: 16rpx;
                        object-fit: cover;
                        box-sizing: border-box;

                        &.single-img {
                            width: calc((100% - 12rpx) / 1.5) !important;
                            /* 覆盖其他样式 */
                            height: 260rpx;
                            /* 高度自适应 */
                            aspect-ratio: 1.5;
                            /* 保持宽屏比例 */
                            border-radius: 16rpx;
                        }
                    }

                    // 视频容器样式
                    .video-container {
                        position: relative;
                        width: calc((100% - 24rpx) / 3);
                        height: 186rpx;
                        border-radius: 16rpx;
                        overflow: hidden;
                        box-sizing: border-box;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        background-color: #000;

                        .dynamic-video {
                            width: 100%;
                            height: 100%;
                            object-fit: contain;
                            background-color: #000;
                            border-radius: 16rpx;
                            position: relative;
                            top: 50%;
                            left: 50%;
                            transform: translate(-50%, -50%);
                        }

                        &.single-img {
                            width: calc((100% - 12rpx) / 1.5) !important;
                            /* 覆盖其他样式 */
                            height: 260rpx;
                            /* 高度自适应 */
                            aspect-ratio: 1.5;
                            /* 保持宽屏比例 */
                            border-radius: 16rpx;
                        }

                        /* 视频播放按钮样式 */
                        .video-play-btn {
                            position: absolute;
                            top: 50%;
                            left: calc(50% + 10rpx);
                            transform: translate(-50%, -50%);
                            width: 60rpx;
                            height: 76rpx;
                            z-index: 10;
                        }

                        /* 视频时长样式 */
                        .video-duration {
                            position: absolute;
                            bottom: 10rpx;
                            left: 10rpx;
                            font-family: Source Han Sans CN;
                            font-weight: 500;
                            font-size: 22rpx;
                            color: #FFFFFF;
                            line-height: 20rpx;
                            background-color: rgba(0, 0, 0, 0.5);
                            padding: 10rpx 10rpx 5rpx 11rpx;
                            border-radius: 10rpx;
                            z-index: 10;
                        }
                    }

                }





                .info {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    width: 100%;
                    height: 60rpx;


                    .info-item {
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        width: 33.33%;
                        height: 100%;
                        background-color: #fff;

                        text {
                            font-family: Source Han Sans CN;
                            font-weight: 400;
                            font-size: 24rpx;
                            color: #A3A6B7;
                            line-height: 41rpx;
                            white-space: nowrap;
                        }

                        .menu-icon {
                            width: 29rpx;
                            height: 28rpx;
                            margin-right: 14rpx;
                        }
                    }

                    .dot {
                        margin: 0 12rpx;
                        color: #ddd;
                    }

                    text {
                        margin-right: 20rpx;
                        color: #666;
                        cursor: pointer;
                        display: flex;
                        align-items: center;

                        &:nth-child(5) {
                            color: #ff6666;
                        }

                        // 点赞图标（可自行替换为 iconfont）
                        &:nth-child(5)::before {
                            content: "♥";
                            margin-right: 6rpx;
                            font-size: 28rpx;
                        }
                    }
                }
            }
        }


        // 评论弹窗优化
        .comment-popup {
            padding: 40rpx 0rpx;
            // 移除固定高度和最小高度
            // height: 58vh;
            // min-height: 58vh;
            background: #FFFFFF;
            border-radius: 35rpx 35rpx 0rpx 0rpx;
            position: relative;
            display: flex;
            flex-direction: column;
            height: 60vh; // 增加弹窗高度，确保有足够空间
            z-index: 90000; // 使用更高的z-index确保弹窗在最上层





            .popup-title {
                font-family: Source Han Sans CN;
                font-weight: bold;
                font-size: 32rpx;
                color: #0E1C37;
                padding: 47rpx 34rpx 20rpx;

                margin-bottom: 50rpx;
                // border-bottom: 2rpx solid #f5f5f5;
            }

            .comment-list {
                flex: 1;
                overflow-y: auto;
                padding: 0 40rpx;
                // height: calc(60vh - 240rpx);
                padding-bottom: 100rpx; // 增加底部内边距，避免被输入框遮挡

                .comment-item {
                    margin-bottom: 30rpx;
                    padding-bottom: 30rpx;
                    border-bottom: 1px solid #f8f8f8;

                    .comment-header {
                        display: flex;
                        align-items: center;
                        width: 99%;

                        .comment-avatar {
                            width: 60rpx;
                            height: 60rpx;
                            border-radius: 50%;
                            margin-right: 20rpx;
                            flex-shrink: 0;
                        }

                        .comment-content {
                            display: flex;
                            justify-content: space-between;
                            align-items: center;
                            width: 81%;

                            .comment-header-left {
                                display: flex;
                                flex-direction: column;

                                .comment-nickname {
                                    color: #333;
                                    font-weight: 700;
                                    font-size: 28rpx;
                                }

                                .comment-time {
                                    color: #999;
                                    font-size: 22rpx;
                                }
                            }

                            .comment-actions {
                                display: flex;
                                align-items: center;
                                color: #888;
                                font-size: 24rpx;
                                margin-right: 30rpx; // 添加右侧间距

                                .comment-likesNum {
                                    font-family: Source Han Sans CN;
                                    font-weight: 400;
                                    font-size: 24rpx;
                                    line-height: 41rpx;
                                    margin-right: 8rpx; // 文字与图标间距
                                    transition: color 0.3s ease;

                                    &.liked {
                                        color: #F76F17; // 点赞后文字变红
                                    }

                                    // 未点赞时的样式
                                    &:not(.liked) {
                                        color: #A3A6B7; // 未点赞文字颜色
                                    }
                                }

                                uni-icons {
                                    transition: color 0.3s ease;
                                }
                            }
                        }
                    }

                    .comment-text {
                        color: #333;
                        font-size: 28rpx;
                        line-height: 42rpx;
                        margin-bottom: 15rpx;
                        margin-left: 80rpx; // 与头像对齐
                    }

                    .reply-list {
                        margin-top: 20rpx;
                        margin-left: 80rpx;
                        width: 555rpx;
                        padding: 20rpx;
                        background: #EEF2F3;
                        border-radius: 10rpx;
                        /* 移除固定高度，改为自适应 */
                        height: auto;
                        min-height: 100rpx;


                        .reply-item {
                            margin-bottom: 15rpx;
                            display: flex;
                            align-items: flex-start;
                            /* 顶部对齐，避免文本换行后与头像不对齐 */

                            .replyer {
                                font-family: Source Han Sans CN;
                                font-weight: 500;
                                font-size: 26rpx;
                                color: #0E1C37;
                                margin-right: 10rpx;
                            }

                            .reply-content {
                                font-family: Source Han Sans CN;
                                font-weight: 400;
                                font-size: 26rpx;
                                color: #888B9A;
                                line-height: 40rpx;
                                /* 确保文本自动换行 */
                                white-space: normal;
                                word-wrap: break-word;
                                flex: 1;
                                /* 占用剩余空间 */
                            }
                        }

                        .view-more {
                            font-family: Source Han Sans CN;
                            font-weight: 400;
                            font-size: 22rpx;
                            color: #888B9A;
                            margin-top: 10rpx;
                            padding: 5rpx 0;
                        }
                    }
                }
            }

            .no-comment {
                display: flex;
                flex-direction: column;
                align-items: center;
                text-align: center;
                color: #999;
                margin: 100rpx 0;
                font-size: 28rpx;

                image {
                    width: 324rpx;
                    height: 277rpx;

                }
            }

            .comment-input-wrap {
                position: absolute;
                bottom: 0;
                left: 0;
                right: 0;
                display: flex;
                align-items: center;
                justify-content: space-between;
                background: #FFFFFF;
                box-shadow: 0rpx 0rpx 6rpx 0rpx #E2E2E2;
                padding: 20rpx;
                border: none;
                z-index: 999999; // 确保在最上层

                .comment-input {
                    width: 490rpx;
                    height: 76rpx;
                    line-height: 90rpx;
                    border: 2rpx solid #eee;
                    padding: 0 20rpx;
                    font-size: 28rpx;
                    background: #FFFFFF;
                    box-shadow: 0rpx 2rpx 7rpx 0rpx rgba(96, 96, 96, 0.2);
                    border-radius: 16rpx;

                }

                .send-btn {
                    width: 130rpx;
                    height: 60rpx;
                    background: #D0D4D7;
                    border-radius: 10rpx;
                    text-align: center;
                    font-family: Source Han Sans CN;
                    font-weight: 400;
                    font-size: 26rpx;
                    color: #888B9A;
                    line-height: 58rpx;
                    border: none;
                    margin-right: -1rpx;

                    &.active {
                        background: #BEFF33;
                        color: #0E1C37;
                    }
                }
            }
        }

        .uni-popup {
            z-index: 99999 !important;
        }

        .uni-popup--bottom {
            z-index: 99999 !important;
        }


        .custom-popup {
            padding: 50rpx 40rpx;
            background-color: #fff;
            border-radius: 35rpx 35rpx 0rpx 0rpx;

            .popup-btn {
                background-color: #BEFF32;
                font-weight: 500;
                font-size: 32rpx;
                color: #0E1C37;
                text-align: center;
                padding: 20rpx 0;
                border-radius: 12rpx;
                margin-bottom: 20rpx;
            }

            .popup-cancel {
                text-align: center;
                font-weight: 400;
                font-size: 32rpx;
                color: #979797;
                margin-top: 45rpx;
            }
        }


        // 举报弹窗优化
        .report-popup {
            width: 618rpx;
            height: 605rpx;
            background: #FFFFFF;
            border-radius: 35rpx;
            padding: 40rpx;

            .report-popup-header {
                display: flex;
                justify-content: space-between;
                align-items: center;
                margin-bottom: 40rpx;

                .popup-title {
                    font-family: Source Han Sans CN;
                    font-weight: bold;
                    font-size: 32rpx;
                    color: #0E1C37;
                }

                .cancel {
                    background: #EEF2F3;
                    border-radius: 10rpx;
                    font-family: Source Han Sans CN;
                    font-weight: 500;
                    font-size: 22rpx;
                    color: #888B9A;
                    padding: 10rpx;
                }
            }


            .report-textarea {
                width: 90%;
                height: 320rpx;
                background: #FFFFFF;
                border-radius: 18rpx;
                border: 2px solid #D0D4D7;
                padding: 29rpx;
                font-size: 28rpx;
                margin-bottom: 40rpx;
                resize: none;
                background-color: #f8f8f8;
            }

            .report-btn {
                width: 100%;
                height: 90rpx;
                line-height: 90rpx;
                text-align: center;
                border: none;
                background: #D0D4D7;
                border-radius: 12rpx;
                font-size: 32rpx;
                transition: background-color 0.3s ease;
            }
        }


    }



    // 发布成功弹窗样式
    .release-success-popup {
        position: fixed;
        bottom: 300rpx;
        left: calc(50% - 122rpx);
        width: 244rpx;
        height: 86rpx;
        background: #404040;
        box-shadow: 0rpx 9rpx 13rpx 0rpx rgba(64, 64, 64, 0.27);
        border-radius: 16rpx;
        display: flex;
        align-items: center;
        justify-content: center;

        .success-text {
            font-family: Source Han Sans CN;
            font-weight: 500;
            font-size: 28rpx;
            color: #FFFFFF;
        }
    }
}